package dk.aiszone.lang.autosource.generatorobjects.interfaces;


/**
 * Interface implemented by classes with supports children.
 * 
 * @author Ais
 */
public interface ChildContainer {

    /**
     * Returns the next <code>SimpleBlockObject</code> in the chain.
     * 
     * @param index
     *            Index of the child to retrieve.
     * 
     * @return The next <code>SimpleBlockObject</code> or <code>null</code> if the <code>ModifiableObject</code> has no more children.
     */
    public abstract SimpleBlockObject getChild(int index);

    /**
     * Retrieve the number of children container by the <code>ModifiableObject</code>.
     * 
     * @return The number of children - or zero if childless.
     */
    public abstract int getChildCount();
}
